package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_ret_irw database table.
 * 
 */
@Entity
@Table(name="per_ret_irw")
@NamedQuery(name="PerRetIrw.findAll", query="SELECT p FROM PerRetIrw p")
public class PerRetIrw implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int irwid;

	private String irwqld;

	private String irwrem;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	//bi-directional many-to-one association to PerRetRse
	@ManyToOne
	@JoinColumn(name="RSEID")
	private PerRetRse perRetRse;

	//bi-directional many-to-one association to PerRetRcd
	@OneToMany(mappedBy="perRetIrw")
	private List<PerRetRcd> perRetRcds;

	public PerRetIrw() {
	}

	public int getIrwid() {
		return this.irwid;
	}

	public void setIrwid(int irwid) {
		this.irwid = irwid;
	}

	public String getIrwqld() {
		return this.irwqld;
	}

	public void setIrwqld(String irwqld) {
		this.irwqld = irwqld;
	}

	public String getIrwrem() {
		return this.irwrem;
	}

	public void setIrwrem(String irwrem) {
		this.irwrem = irwrem;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

	public PerRetRse getPerRetRse() {
		return this.perRetRse;
	}

	public void setPerRetRse(PerRetRse perRetRse) {
		this.perRetRse = perRetRse;
	}

	public List<PerRetRcd> getPerRetRcds() {
		return this.perRetRcds;
	}

	public void setPerRetRcds(List<PerRetRcd> perRetRcds) {
		this.perRetRcds = perRetRcds;
	}

	public PerRetRcd addPerRetRcd(PerRetRcd perRetRcd) {
		getPerRetRcds().add(perRetRcd);
		perRetRcd.setPerRetIrw(this);

		return perRetRcd;
	}

	public PerRetRcd removePerRetRcd(PerRetRcd perRetRcd) {
		getPerRetRcds().remove(perRetRcd);
		perRetRcd.setPerRetIrw(null);

		return perRetRcd;
	}

}